<?php
namespace Home\Controller;

use Think\Controller;

class ServiceController extends BaseController
{
    /**
     * 职位列表页，默认显示第一个分类
     *
     */
    public function index()
    {
        $data['menu'] = "service";
        $this->assign($data);
        $this->display();
    }

    public function do_service()
    {
        $name = I("post.name", 0);
        $mobile = I("post.mobile", 0);
        $qq = I("post.qq", 0);
        $email = I("post.email", 0);
        $content = I("post.content", 0);
        $title = I("post.title", 0);
        $sex = I("post.sex", 1);
        $data = array(
            'name' => $name,
            'qq' => $qq,
            'mobile' => $mobile,
            'email' => $email,
            'content' => $content,
            'title' => $title,
            'sex' => $sex,
            'add_time' => time()
        );
        $res = M("Service")->table("dsk_message")->data($data)->add();
        echo $res;
    }

}